<template>
  <div class="link" @click="linkClick">
    <a
      class="link-a"
      :href="'https://' + comData.comPorps.link"
      :style="comData.style"
      ref="linkCom"
      >{{ comData.comPorps.content }}
    </a>
  </div>
</template>

<script>
export default {
  props: ['comData', 'edit'],
  data() {
    return {}
  },
  methods: {
    linkClick(e) {
      if (this.edit) {
        //hp更改了跳转函数
        e.preventDefault() //编辑模式下阻止跳转，点击时返回属性
      }
    },
  },
}
</script>

<style scoped>
.link {
  text-align: center;

  height: 40px;
  padding: 1px 10px;
  box-sizing: content-box;
  border: 1px solid transparent;
}
</style>
